package view

import "time"

type AdminViewStruct struct {
	AdminTokenId           int       `json:"admin_token_id" gorm:"type:int(11); NOT NULL;"`
	AdminTokenAdminId      int       `json:"admin_token_admin_id" gorm:"type:int(11)"`
	AdminTokenAccessToken  string    `json:"admin_token_access_token" gorm:"type:varchar(255)"`
	AdminTokenRefreshToken string    `json:"admin_token_refresh_token" gorm:"type:varchar(255)"`
	AdminTokenExpires      time.Time `json:"admin_token_expires" gorm:"type:datetime"`
	AdminTokenCreatedAt    time.Time `json:"admin_token_created_at" gorm:"type:datetime"`
	AdminTokenUpdatedAt    time.Time `json:"admin_token_updated_at" gorm:"type:datetime"`
	AdminId                int       `json:"admin_id" gorm:"type:int(11); NOT NULL;"`
	AdminUsername          string    `json:"admin_username" gorm:"type:varchar(32); COMMENT:'用户名'"`
	AdminPassword          string    `json:"admin_password" gorm:"type:varchar(32); COMMENT:'密码'"`
	AdminSalt              string    `json:"admin_salt" gorm:"type:varchar(30); COMMENT:'密码盐'"`
	AdminStatus            string    `json:"admin_status" gorm:"type:varchar(30); COMMENT:'状态'"`
	AdminCreatedAt         time.Time `json:"admin_created_at" gorm:"type:datetime"`
	AdminUpdatedAt         time.Time `json:"admin_updated_at" gorm:"type:datetime"`
	AdminGroupId           uint      `json:"admin_group_id" gorm:"type:int(10) unsigned; NOT NULL;"`
	AdminGroupName         string    `json:"admin_group_name" gorm:"type:varchar(100); COMMENT:'组名'"`
	AdminGroupRules        string    `json:"admin_group_rules" gorm:"type:text; NOT NULL; COMMENT:'规则ID'"`
	AdminGroupCreatetime   time.Time `json:"admin_group_createtime" gorm:"type:bigint(16); COMMENT:'创建时间'"`
	AdminGroupUpdatetime   time.Time `json:"admin_group_updatetime" gorm:"type:bigint(16); COMMENT:'更新时间'"`
	AdminGroupStatus       int       `json:"admin_group_status" gorm:"type:tinyint(1); COMMENT:'状态'"`
}

func (c *AdminViewStruct) TableName() string {
	return "admin_view"
}
